Developer Documentation

QuickTime 4 API Documentation

Programming With QuickTime VR

| Previous | Chapter Contents | Chapter Top | Next |

Node-Entering and Node-Leaving Procedures

Your application can define node-entering and node-leaving procedures that are called each time a node is entered or left.

MyEnteringNodeProc

You can define a routine to respond to a node's being entered.

pascal OSErr MyEnteringNodeProc (
                     QTVRInstance qtvr,
                     UInt32 nodeID,
                     SInt32 refCon);
qtvr
An instance of a QuickTime VR movie.
nodeID
The ID of the node being entered.
refCon
The reference constant specified in the call to QTVRSetEnteringNodeProc that installed this procedure.
function result
A result code.

DESCRIPTION

Your MyEnteringNodeProc procedure is called whenever a node is entered, either in response to user actions or in response to QuickTime VR Manager functions that change nodes (such as QTVRGoToNodeID ). Your procedure can do any processing it deems necessary.

SEE ALSO

Use QTVRSetEnteringNodeProc to install a node-entering procedure. See Listing 2-8 for a sample node-entering procedure.

MyLeavingNodeProc

You can define a routine to respond to a node's being left.

pascal OSErr MyLeavingNodeProc (
                     QTVRInstance qtvr,
                     UInt32 fromNodeID,
                     UInt32 toNodeID,
                     Boolean *cancel,
                     SInt32 refCon);
qtvr
An instance of a QuickTime VR movie.
fromNodeID
The ID of the node being left.
toNodeID
The ID of the node to be entered, or 0 if no node is being entered (because the movie is being closed).
cancel
On entry, a pointer to a Boolean value. Set that value to true to cancel the move from fromNodeID to toNodeID ; otherwise, set that value to false .
refCon
The reference constant specified in the call to QTVRSetLeavingNodeProc that installed this procedure.
function result
A result code.

DESCRIPTION

Your MyLeavingNodeProc procedure is called whenever a node is left, either in response to user actions or in response to QuickTime VR Manager functions that change nodes (such as QTVRGoToNodeID ). Your procedure can do any processing it deems necessary.

Before returning, your procedure should set the Boolean value pointed to by the cancel parameter to false to accept the move from fromNodeID to toNodeID . Set that value to true to cancel the move and to remain at the node specified by the fromNodeID parameter.

SEE ALSO

Use QTVRSetLeavingNodeProc to install a node-leaving procedure. See Listing 2-9 for a sample node-leaving procedure.


© 1998 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |